package com.jdd.fintech.morse.plugin.plugconfig;

import com.jdd.fintech.morse.plugin.enums.EncrAndDecrAlgorithmTypeEnum;
import com.jdd.fintech.morse.plugin.enums.BooleanEnum;
import com.jdd.fintech.morse.plugin.enums.CustomVersionEnum;
import com.jdd.fintech.morse.plugin.enums.EncrAndDecrAlgorithmModelEnum;
import com.jdd.fintech.morse.plugin.enums.RequestDateDirectionEnum;

/**
 * @Description: morse 插件值配置类
 * @Author: fengcheng
 * @Date: 2021/5/27
*/
public class MorsePlugValueConfig {

    /**
     * 是否加解密:是YES,否NO
     */
    private BooleanEnum encyAndDecyFlag;

    /**
     * 配置加解密字段，值为属性名(现阶段只考虑配置一个字段)
     */
    private String encyAndDecyFieldKey;

    /**
     * 加解密算法类型：（AES， DES， TRIPLE_DES， SM4， RSA）
     */
    private EncrAndDecrAlgorithmTypeEnum encyAndDecyType;

    /**
     * 加解密算法模式: ECB, CBC, CTR, RSA
     */
    private EncrAndDecrAlgorithmModelEnum encryptMode;

    /**
     * 加密公钥
     */
    private String publicSecurity;

    /**
     * 解密密钥
     */
    private String privateSecurity;

    /**
     * 密钥长度
     */
    private int keySize;

    /**
     * 盐值
     */
    private String salt;

    /**
     * 是否完整加解密: 是YES,否NO
     */
    private BooleanEnum isComplete;

    /**
     * G：金条；JC：金城；MS：Morse标准化；CL：云地结合；PAHP：平安惠普
     */
    private CustomVersionEnum customVersion;

    /**
     * 请求数据方向：request  或者   response
     */
    private RequestDateDirectionEnum requestDateDirection;

    /**
     * 是否是文件: 是YES,否NO
     */
    private BooleanEnum isFile;

    /**
     * 报文KEY：属性名称配置
     */
    private String dataContentKey;

    /**
     * 签名KEY：属性名称配置
     */
    private String signKey;

    /**
     * 是否获取远程token
     */
    private BooleanEnum remoteToken;

    /**
     * 获取远程token请求配置对象
     */
    private MorsePlugValueTokenConfig tokenConfig;

    /**
     * 扩展请求参数通过插件值配置进行传输
     */
    private String extendParameter;

    public MorsePlugValueConfig() {}

    public MorsePlugValueConfig(CustomVersionEnum customVersion, BooleanEnum remoteToken, MorsePlugValueTokenConfig tokenConfig) {
        this.customVersion = customVersion;
        this.remoteToken = remoteToken;
        this.tokenConfig = tokenConfig;
    }

    /**
     * 是否加解密:是YES,否NO
     */
    public BooleanEnum getEncyAndDecyFlag() {
        return encyAndDecyFlag;
    }

    public void setEncyAndDecyFlag(BooleanEnum encyAndDecyFlag) {
        this.encyAndDecyFlag = encyAndDecyFlag;
    }

    /**
     * 配置加解密字段，值为属性名(现阶段只考虑配置一个字段)
     */
    public String getEncyAndDecyFieldKey() {
        return encyAndDecyFieldKey;
    }

    public void setEncyAndDecyFieldKey(String encyAndDecyFieldKey) {
        this.encyAndDecyFieldKey = encyAndDecyFieldKey;
    }

    /**
     * 加解密算法类型：（AES， DES， TRIPLE_DES， SM4， RSA）
     */
    public EncrAndDecrAlgorithmTypeEnum getEncyAndDecyType() {
        return encyAndDecyType;
    }

    /**
     * 加解密算法类型：（AES， DES， TRIPLE_DES， SM4， RSA）
     */
    public void setEncyAndDecyType(EncrAndDecrAlgorithmTypeEnum encyAndDecyType) {
        this.encyAndDecyType = encyAndDecyType;
    }

    /**
     * 加解密算法模式: ECB, CBC, CTR, RSA
     */
    public EncrAndDecrAlgorithmModelEnum getEncryptMode() {
        return encryptMode;
    }

    /**
     * 加解密算法模式: ECB, CBC, CTR, RSA
     */
    public void setEncryptMode(EncrAndDecrAlgorithmModelEnum encryptMode) {
        this.encryptMode = encryptMode;
    }

    /**
     * 加密公钥
     */
    public String getPublicSecurity() {
        return publicSecurity;
    }

    public void setPublicSecurity(String publicSecurity) {
        this.publicSecurity = publicSecurity;
    }

    /**
     * 解密密钥
     */
    public String getPrivateSecurity() {
        return privateSecurity;
    }

    public void setPrivateSecurity(String privateSecurity) {
        this.privateSecurity = privateSecurity;
    }

    /**
     * 密钥长度
     */
    public int getKeySize() {
        return keySize;
    }

    public void setKeySize(int keySize) {
        this.keySize = keySize;
    }

    /**
     * 盐值
     */
    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    /**
     * 是否完整加解密: 是YES,否NO
     */
    public BooleanEnum getIsComplete() {
        return isComplete;
    }

    public void setIsComplete(BooleanEnum isComplete) {
        this.isComplete = isComplete;
    }

    /**
     * G：金条；JC：金城；MS：Morse标准化；CL：云地结合；PAHP：平安惠普
     */
    public CustomVersionEnum getCustomVersion() {
        return customVersion;
    }

    public void setCustomVersion(CustomVersionEnum customVersion) {
        this.customVersion = customVersion;
    }

    /**
     * 请求数据方向：request  或者   response
     */
    public RequestDateDirectionEnum getRequestDateDirection() {
        return requestDateDirection;
    }

    public void setRequestDateDirection(RequestDateDirectionEnum requestDateDirection) {
        this.requestDateDirection = requestDateDirection;
    }

    /**
     * 是否是文件: 是YES,否NO
     */
    public BooleanEnum getIsFile() {
        return isFile;
    }

    public void setIsFile(BooleanEnum isFile) {
        this.isFile = isFile;
    }

    /**
     * 报文内容：属性名称配置
     */
    public String getDataContentKey() {
        return dataContentKey;
    }

    public void setDataContentKey(String dataContentKey) {
        this.dataContentKey = dataContentKey;
    }

    /**
     * 签名：属性名称配置
     */
    public String getSignKey() {
        return signKey;
    }

    public void setSignKey(String signKey) {
        this.signKey = signKey;
    }

    /**
     * 是否获取远程token
     */
    public BooleanEnum getRemoteToken() {
        return remoteToken;
    }

    public void setRemoteToken(BooleanEnum remoteToken) {
        this.remoteToken = remoteToken;
    }

    /**
     * 获取远程token请求配置对象
     */
    public MorsePlugValueTokenConfig getTokenConfig() {
        return tokenConfig;
    }

    public void setTokenConfig(MorsePlugValueTokenConfig tokenConfig) {
        this.tokenConfig = tokenConfig;
    }

    public String getExtendParameter() {
        return extendParameter;
    }

    public void setExtendParameter(String extendParameter) {
        this.extendParameter = extendParameter;
    }
}
